<%--
  Created by IntelliJ IDEA.
  User: 28797
  Date: 2022/10/20
  Time: 16:40
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java"  isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../js/jquery-3.6.0.min.js"></script>
    <script src="../layui/layui.js"></script>
    <link rel="stylesheet" href="../layui/css/layui.css">
    <link rel="stylesheet" href="../css/head_daohang.css">
    <link rel="stylesheet" href="../css/Car-search.css">
    <script src="../js/laydate.js"></script>
    <link rel="stylesheet" href="../css/laydate.css">
    <script src="../js/Car-search.js"></script>
</head>

<body>
<!-- 头部 -->
<div id="head">
    <div class="layui-col-md2">
        <div class="grid-demo ">
            <div class="head-logo"></div>
        </div>
    </div>
    <div class="layui-col-md2">
        <div class="grid-demo head-demo"><a href="${pageContext.request.contextPath}/index.jsp" class="word-1">首页</a></div>
    </div>
    <div class="layui-col-md2">
        <div class="grid-demo head-demo"><a href="${pageContext.request.contextPath}/car/getCarView" class="head-hover word-1">自驾租车</a>
        </div>
    </div>
    <%--    <div class="layui-col-md1">--%>
    <%--        <div class="grid-demo head-demo"><a href="${pageContext.request.contextPath}/long_time_older/long_time.jsp" class="head-hover word-1">长租专区</a>--%>
    <%--        </div>--%>
    <%--    </div>--%>
    <div class="layui-col-md2">
        <div class="grid-demo head-demo"><a href=" ${pageContext.request.contextPath}/carOutlets/carAllList" class="head-hover word-1">车型查询</a>
        </div>
    </div>
    <div class="layui-col-md2">
        <div class="grid-demo head-demo"><a href="${pageContext.request.contextPath}/Offline_outlets/Business_outlets.jsp" class="head-hover word-1">营业网点</a></div>
    </div>
    <%--    <div class="layui-col-md1">--%>
    <%--        <div class="grid-demo head-demo"><a href="" class="head-hover word-1">会员专区</a></div>--%>
    <%--    </div>--%>
    <div class="layui-col-md2">
        <div class="grid-demo head-demo1">
            <i class="login-icon"></i>
            <a href="${pageContext.request.contextPath}/login/login.jsp" class="head-color">登录/注册</a>
        </div>
        <div class="tel">
            <i class="tel-icon"></i>
            <span class="tel-num">110-119-1111</span>
        </div>
    </div>
</div>

<!-- 身体 -->
<div class="main-wrap">


    <!-- 时间 -->
    <div class="search-box">
        <div class="store-box">
            <form action="">
                <div class="city-box-brandstep1">
                    <em></em>
                    <span>苏州</span>
                </div>
                <div class="time-box">
                    <em></em>
                    <div  style="float:left">  <span>取车时间</span>
                        <div style="position: relative; display: inline-block; width: 147px; height: 32px;">
                            <input type="text" class="layui-input" id="test1" style="height: 32px ; width: 130px;">
                        </div>
<%--                        <div style="position: relative; display: inline-block; width: 70px; height: 32px;">--%>
<%--                            <input type="text" class="layui-input" id="test2" style="height: 32px ; width: 70px; ">--%>
<%--                            <script>--%>
<%--                                $("#test2").render({--%>
<%--                                    elem: '#test14'--%>
<%--                                    ,type: 'time'--%>
<%--                                    ,format: 'H点M分'--%>
<%--                                });--%>
<%--                            </script>--%>
<%--                        </div>--%>
                    </div>

                    <span >还车时间</span>

                    <div style="position: relative; display: inline-block; width: 147px; height: 32px;">
                        <input type="text" class="layui-input" id="test3" style="height: 32px ; width: 130px;">
                    </div>
<%--                    <div style="position: relative; display: inline-block; width: 70px; height: 32px; " >--%>
<%--                        <input type="text" class="layui-input" id="test4" style="height: 32px ; width: 70px;">--%>
<%--                        <script>--%>
<%--                            $("#test2").render({--%>
<%--                                elem: '#test14'--%>
<%--                                ,type: 'time'--%>
<%--                                ,format: 'H点M分'--%>
<%--                            });--%>
<%--                        </script>--%>
<%--                    </div>--%>


                </div>
                <div class="btn-box">
                    <input type="submit" id="J_SumitBooking" class="submit" value="查询">
                </div>
            </form>
        </div>
    </div>

    <!-- 多条件删选 -->
    <div id="J_CarType" class="car-wrap">
        <div class="brand-box">
            <div class="type-box">
                <span>类  型:</span>
                <a href="javascript:;" class="J_CarLevel">经济型</a>

                <a href="javascript:;" class="J_CarLevel">舒适型</a>

                <a href="javascript:;" class="J_CarLevel">精英型</a>

                <a href="javascript:;" class="J_CarLevel">suv型</a>

                <a href="javascript:;" class="J_CarLevel">商务型</a>

                <a href="javascript:;" class="J_CarLevel">电动型</a>
            </div>

            <div class="brand-box-list" style="height: 200px;">
                <span>品  牌:</span>
                <div id="clicktab" class="tabbox">
                    <div class="tabcon" style="display: none;" >

                        <a href="javascript:;" class="J_CarLevel">经济型</a>

                        <a href="javascript:;" class="J_CarLevel">舒适型</a>

                        <a href="javascript:;" class="J_CarLevel">精英型</a>

                        <a href="javascript:;" class="J_CarLevel">suv型</a>

                        <a href="javascript:;" class="J_CarLevel">商务型</a>

                        <a href="javascript:;" class="J_CarLevel">电动型</a>

                        <a href="JavaScript:;" class="J_BrandName" bnid="1" >雪佛兰</a>

                        <a href="JavaScript:;" class="J_BrandName" bnid="2" >大众</a>

                        <a href="JavaScript:;" class="J_BrandName" bnid="3" >本田</a>

                        <a href="JavaScript:;" class="J_BrandName" bnid="4" >丰田</a>

                        <a href="JavaScript:;" class="J_BrandName" bnid="5" >别克</a>

                    </div>
                    <div class="tabcon tab-all" style="display: block;">

                        <a href="JavaScript:;" class="J_BrandName1" bnid="1" >雪佛兰</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="2" >大众</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="3" >本田</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="4" >丰田</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="5" >别克</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="1" >雪佛兰</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="2" >大众</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="3" >本田</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="4" >丰田</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="5" >别克</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="1" >雪佛兰</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="2" >大众</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="3" >本田</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="4" >丰田</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="5" >别克</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="1" >雪佛兰</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="2" >大众</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="3" >本田</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="4" >丰田</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="5" >别克</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="4" >丰田</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="5" >别克</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="1" >雪佛兰</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="2" >大众</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="3" >本田</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="4" >丰田</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="5" >别克</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="1" >雪佛兰</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="2" >大众</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="3" >本田</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="4" >丰田</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="5" >别克</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="4" >丰田</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="5" >别克</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="1" >雪佛兰</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="2" >大众</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="3" >本田</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="4" >丰田</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="5" >别克</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="1" >雪佛兰</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="2" >大众</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="3" >本田</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="4" >丰田</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="5" >别克</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="4" >丰田</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="5" >别克</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="1" >雪佛兰</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="2" >大众</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="3" >本田</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="4" >丰田</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="5" >别克</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="1" >雪佛兰</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="2" >大众</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="3" >本田</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="4" >丰田</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="5" >别克</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="4" >丰田</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="5" >别克</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="1" >雪佛兰</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="2" >大众</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="3" >本田</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="4" >丰田</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="5" >别克</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="1" >雪佛兰</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="2" >大众</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="3" >本田</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="4" >丰田</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="5" >别克</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="4" >丰田</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="5" >别克</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="1" >雪佛兰</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="2" >大众</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="3" >本田</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="4" >丰田</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="5" >别克</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="1" >雪佛兰</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="2" >大众</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="3" >本田</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="4" >丰田</a>

                        <a href="JavaScript:;" class="J_BrandName1" bnid="5" >别克</a>






                    </div>
                </div>
                <div class="tabcon" style="display: none;" >

                    <a href="javascript:;" class="J_CarLevel">经济型</a>

                    <a href="javascript:;" class="J_CarLevel">舒适型</a>

                    <a href="javascript:;" class="J_CarLevel">精英型</a>

                    <a href="javascript:;" class="J_CarLevel">suv型</a>

                    <a href="javascript:;" class="J_CarLevel">商务型</a>

                    <a href="javascript:;" class="J_CarLevel">电动型</a>

                    <a href="JavaScript:;" class="J_BrandName" bnid="1" >雪佛兰</a>

                    <a href="JavaScript:;" class="J_BrandName" bnid="2" >大众</a>

                    <a href="JavaScript:;" class="J_BrandName" bnid="3" >本田</a>

                    <a href="JavaScript:;" class="J_BrandName" bnid="4" >丰田</a>

                    <a href="JavaScript:;" class="J_BrandName" bnid="5" >别克</a>

                </div>
            </div>


        </div>



        <div class="choosen-box" style="display: none;">
            <div class="J_Search">
                <i>已选条件</i>
                <div class="selected carLevel">

                </div>
                <div class="selected carBrand">
                  <span bind="1">雪佛兰
                    <em></em>
                  </span>
                </div>
                <a href="#1" id="J_SearchClear">清除条件</a>
            </div>
        </div>


        <div class="car-box">

            <c:forEach var="car" items="${carList}">

                <a href="../car/${car.carId}" class="car-list J_car" target="_blank">
                    <em class=""></em>
                    <div class="car-img">
                        <img src="../${car.other1}" alt="荣威550混动沪牌" style="display: inline;">
                    </div>,
                    <div class="car-des">
                        <span title="荣威550混动沪牌">${car.carName}</span>
                        <i>${car.carSeat}座${car.carCase}挡</i>
                    </div>
                </a>

            </c:forEach>

        </div>


    </div>


</div>

<!-- 尾部 -->
<div class="footer">
    <div class="footer-box">
        <div class="footer-left">
            <p>
                <span>客服中心</span> |
                <span>移动客户端</span> |
                <span>帮助中心</span> |
                <span>建议专区</span> |
                <span>联系我们</span> |
                <span>友情连接</span> |
                <span>投诉通道：400-821-1608</span>
            </p>
            <p>
                <span>Copyright © 2007-2022 苏州无忧信息技术服务有限公司 ICP证：苏B2-20140130|苏ICP备08010394号-1</span>
            </p>
        </div>
        <div class="footer-right"></div>
    </div>
</div>

<script>
    loadInitData();
    $(".exit-token").click(function (){
        localStorage.clear();
    })


    function loadInitData(){
        console.log("00000000000000")
        var token = localStorage.getItem("token");
        // ----->cpmtollrt toke 你=-----
        console.log("token-----:"+token)

        $.ajax({
            type: "get",
            url: "${pageContext.request.contextPath}/customer/personalData",
            headers: {"token": token},
            success: function (result) {
                console.log(result);
                var loginUser = result.data.loginCustomer;

                if(loginUser != null) {
                    $(".head-color").text(loginUser.custName);
                    $(".head-color").attr("href", "${pageContext.request.contextPath}/customer/getId/" + loginUser.custId);

                }else{
                    console.log("2222222")
                    $(".head-color").text("登录");
                    $(".head-color").attr("href", "login/login.jsp");
                }
            }
        })
    }
</script>

</body>
</html>